package com.kantboot.business.shop.domain.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

@Entity
@Getter
@Setter
@Table(name = "bus_shop_goods_type")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
public class BusShopGoodsType implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @CreatedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;

    /**
     * 名称
     */
    @Column(name = "t_name")
    private String name;

    /**
     * 图标的文件ID
     */
    @Column(name = "file_id_of_icon")
    private Long fileIdOfIcon;

    /**
     * 父级ID
     */
    @Column(name = "parent_id")
    private Long parentId;

    /**
     * 优先级（越大越靠前）
     */
    @Column(name = "t_priority")
    private Integer priority;

    /**
     * 是否手机端首页展示
     */
    @Column(name = "is_show_in_mobile_index")
    private Boolean isShowInMobileIndex;

}
